//创建管理端的路由
const express = require('express');

const admin = express.Router();
//创建二级路由
//创建分类页面发送的请求
admin.post('/categories', require('./admin/categoriesEdit'));
//列表页面发送的请求
admin.get('/categories', require('./admin/categoriesList'));
//修改操作
admin.get('/categories/:id', require('./admin/categoriesEdit'));
admin.put('/categories/:id', require('./admin/categoriesEdit-modify.js'));
//删除操作
admin.delete('/categories/:id', require('./admin/categoriesDelete'));

module.exports = admin;
